package com.zhu.androidsample.util;

import android.content.Context;

import com.android.volley.RequestQueue;
import com.android.volley.toolbox.Volley;

/**
 * Created by ZCP on 2015/11/20.
 * mail:43426073@qq.com
 */
public class VolleyUtil {
    static RequestQueue queue;

    public static void initVolleyUtil(Context context) {
        queue = Volley.newRequestQueue(context);
    }

    public static RequestQueue getQueue() {
        if (queue == null) {
            throw new RuntimeException("initVolleyUtil() method must be called before use!");
        }
        return queue;
    }
}
